package com.locus;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.locus.tools.location.AccessibleMapView;

import android.os.Bundle;

public class locus extends MapActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {

    	/*
    	 * Plan
    	 *  3 sub activities:
    	 *  (1) Start IntentReciever activity.
    	 *  	* Responds to incoming GPS requests with GPS info.
    	 *  		|Responsibilities|
    	 *  		| Checks if a contact is blocked/unblocked/being spoofed, responds appropriately |
    	 *  		| Communicates w/ LocalLocation instance to get up to date GPS data. |
    	 *  (2) Updater Activity
    	 *  	* calls update functions on all contacts and yourself
    	 *  		|Comments|
    	 *  		| Do we delay? Does it get it's own thread? |
    	 *  (3) Main Activity
    	 *  	* Has some sub-activities
    	 *  		(3.1) Main subactivity
    	 *  			* just a view of the map with all the contacts and your location drawn in.
    	 *  		(3.2) Get directions subactivity
    	 *  			* calls up an overlay on the main screen with a list box with a list of contacts w/ 
    	 *  			   known locations, choose one, get directions via com.google.android.maps.directions
    	 *  			   or w/e, and be done.
    	 *  		(3.3) Get directions for people subactivity
    	 *  			* another overlay, two textboxes with remote contacts, gets directions between them.
    	 *  		(3.4) Spoof contact
    	 *  			* sends false gps data to a contact. same as get-directions, except after choosing, 
    	 *  			   you click the screen where you want them to believe you are.
    	 * 			(3.5) Block contact -- exactly as it sounds
    	 * 			(3.6) Force contact -- requires some kind of "parents password", prevents blocking/spoofing
    	 * 				   from contact.
    	 */
    	
    	// setup the gui
    	super.onCreate(icicle);
        setContentView(R.layout.main);
        
        
        // now we're going to setup the controller to which we'll add overlays later.
        AccessibleMapView amv = new AccessibleMapView(this);
        MapController mc = amv.getController();
        
        
        
        System.out.println(mc.toString());
        
        // TODO:: Utility class to return a list of LocationOverlays for adding to the MC
        // maybe instead we should refactor the remote/local locations into an abstract "location" type, 
        // and map over a list of the abstract type
        // or use an interface? thats probably better.
        
    }
}